package controllers

// Respond 后端响应类
type Respond struct {
	Code uint8  `json:"code"`
	Msg  string `json:"msg"`
	Data any    `json:"data"`
}

// LayuiData layui table 数据格式相应
type LayuiData struct {
	Code  int    `json:"code"`
	Msg   string `json:"msg"`
	Count int64  `json:"count"`
	Data  any    `json:"data"`
}

// LayuiTransfer Layui的Transfer 数据响应
type LayuiTransfer struct {
	Value string `json:"value" form:"value"`
	Title string `json:"title" form:"value"`
}

// UserFormData 解析前端用户数据
type UserFormData struct {
	Name           string `form:"name" binding:"required"`
	Password       string `form:"password" `
	VerifyPassword string `form:"verify_password" binding:"eqfield=Password"`
	Phone          string `form:"phone" binding:"required"`
	Email          string `form:"email" binding:"required,email"`
	Sex            int8   `form:"sex" binding:"required"`
	Status         int8   `form:"status" binding:"required"`
	Roles          string `form:"roles"`
}
type RolesFormData struct {
	Name      string `json:"name"`
	Describe  string `json:"describe"`
	Status    string `json:"status"`
	MenuIDs   []int  `json:"menuIDs"`
	AssetsIds []int  `json:"assetsIds"`
}
